<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="text" v-model.lazy="val">
        <h1>{{val}}</h1>
    </div>
</body>

</html>
<script src='https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js'></script>
<script>
    //number 转换成number
    //trim 修饰字符串两边的空间
    //lazy 惰性的数据同步
    let vm = new Vue({
        el: "#app",
        data: {
            val: '777'
        }
    })
</script>